package sample.sub1.section08

object Section08 {
	def main(args: Array[String]) {
		val list = List(-11, -10, -5, 0, 5, 10, 11);
		val func1 = () => {
			println("func1 start");
			list.foreach((x: Int) => println(x));
			println("func1 end");
		}
		
		val func2 = ()=> {
			println("func2 start");
			list.filter(x => x > 0).foreach(println(_));
			println("func2 end");
		}
		
		func1();
		func2();
		
		def func3 (a: String*) {
			println("func3 start");
			a.foreach(println _);
			println("func3 end");
		}
		
		func3();
		func3("a");
		func3("1", "2", "3")
	}
}